package com.cmcc.example.face.noSdk.common.vo.request;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * <p>
 * <name>FaceSetFindVO</name>
 * 人脸集合查询请求对象
 * </p >
 *
 * @author arabira
 * @version 1.0 2020-04-09
 * @since 1.0
 */
@Data
public class FaceSetFindVO implements Serializable {
    private static final long serialVersionUID = -4752131657313235700L;
    private String name;
    private int pageNum;
    private int pageSize;

    public FaceSetFindVO(String name, int pageNum, int pageSize) {
        this.name = name;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }

    public String getFieds() {
        String field = "";
        if (StringUtils.isNotBlank(name)) {
            field += "&name=" + name;
        }
        if (pageNum >= 0) {
            field += "&page=" + pageNum;
        }
        if (pageSize >= 0) {
            field += "&row=" + pageSize;
        }

        return field;
    }
}